<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<demo :msg="msg" :num="num"></demo>
		</div>
	</body>
</html>

<script type="text/javascript">
	const demo = {
		template: `<div>{{msg}}    -----     {{num}}</div>`,
		props: {
			msg: {
				// 校验类型
				type: String,
				// 空校验
				require: true
			},
			num: {
				// 校验类型
				type: Number,
				// 空校验
				require: true
			}
		}
	}
	
	new Vue({
		el: '#app',
		data: {
			msg: 'hello',
			num: 100
		},
		components: {
			demo
		}
	})
	
	
</script>
